package month4.day24;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Scanner;

public class C6 {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        SimpleDateFormat s=new SimpleDateFormat("yyyy年MM月dd日 EE");
        Calendar c=Calendar.getInstance();
        System.out.println("请输入年份");
        int t=in.nextInt();
        for (int i=0,n=0;i<30;i++){
            c.set(t,5,i);
            if (c.get(Calendar.DAY_OF_WEEK)==1){
                n++;
            }
            if (n==3){
                System.out.println("父亲节是"+s.format(c.getTime()));
                break;
            }
        }

    }
}
